﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

    <link rel="stylesheet" href="../css/css.css" />
    <script  type="text/javascript" src="../js/1.9.1.min.js" ></script>
    <script type="text/javascript" src="../js/zepto.js"></script>
    <script src="../js/public.js"></script>
    <script src='../js/index.js'></script>
    <title>
        元宝网｜综合数字资产交易平台
    </title>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?bdf95dc7fc4c22c518fc712d90092d31";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body>

<header class="header">
    <a href="/coins"><div class="logo"></div></a>
    <div class="nav">
        <a href="/coins" >币币交易</a>
        <!--<a href="/user/login" >登录</a>-->
         <a href="/user/login" id="logins"  >登录</a>
                <a href="https://www.yuanbao.com/user/reg">注册</a>
            </div>
</header>
<script  type="text/javascript" src="../js/sendmessage.js"></script>
<style>
    .bullet_p a:last-child, .bullet_p span:last-child{
      width: 49%;
    }
    .tip-box{
      color: red;
      display: inline-block;
      text-indent: 1.7rem;
     margin-top: 0.2rem;
    }
</style>
<div class="Wf-div1">
    <a href="javascript:history.back()">返回</a>
    <span>找回登录密码</span><strong  style="color:red"></strong>
</div>
<div class="strip"></div>
<p class="bullet_p">
    <span class="actives bull_click">通过注册邮箱找回</span><i class="bull_span_shu">|</i><span class="bull_click">通过绑定手机号找回</span>
</p>
<div class="cb-box1 tb-box1">
<!--    通过注册邮箱找回-->
    <form method="post" onsubmit="return sendMessage.checkValid();">
    <input type="hidden" name="isSendphone" value="0"/>
    <p class="p5" style="margin-top: 0.8rem"><label>电子邮箱</label>
        <input type="email" style="width: 5.04rem;" class="loginValue" value="" id="email" name="email" placeholder="请输入您的邮箱">
            </p>
    <p class="p5 p5_f ">
        <label style="margin-right:0.1rem">图形验证</label>
        <input type="text" class="loginValue Txt11" name="captcha" id="captcha" placeholder="图形验证码" style="wdith:2rem;">
                <a href="#" class="p5_kanbuq" onclick="$('#captchaimg').attr('src', '/index/captcha?t='+Math.random())">看不清？</a>
        <img id="captchaimg" class="capture forget_img_11" src="../picture/5b57eaa4af564ebdac57c9aff19708a1.gif">
    </p>
     <p class="p5 p5_f" id="phone_alert" style="display:none" >
        <span>
        <label style="margin-right: 4px;" >短信验证</label>
        <input type="text" class="Txt22"  name='phone_code' id="phone_code_wallet"  placeholder="请输入短信验证码">
        </span>
        <label class="verify phone_code verify_code" name="getPhoneCode" onclick="sendMessage.getPhoneCode(this)">获取短信验证码</label>
    </p>
    <p class="p5" style="margin-top: 0.7rem;"><input type="submit" class="input_news_password"  value="找回密码" /></p>
     </form>
<!--     通过绑定手机号找回-->
     <form method="post" action="/user/mfindpwd" style="display:none"> 
        <p class="p5"><label>手机号</label>
         <input type="text" style="width: 5.04rem;" class="loginValue" name="phone" placeholder="请输入手机号">
        </p>
        <label class="tip-box phone_note" style="display:none" >手机号不正确</label>
        <p class="p5 p5_f">
           <span>
           <label style="margin-right: 4px;" >短信验证</label>
           <input type="text" class="Txt22"  name="code" placeholder="请输入短信验证码" autocomplete="new-password">
           </span>
           <label class="verify phone_code verify_code" name="getPhoneCode" onclick="sendPhoneCode()">获取短信验证码</label>
       </p>
       <label class="tip-box code_note" style="display:none">请输入验证码</label>
        <p class="p5"><label>新密码</label>
            <input type="password" style="width: 5.04rem;" class="loginValue" name="pwd" placeholder="请输入新密码" autocomplete="new-password">
       </p>
       <label class="tip-box pwd_note" style="display:none"></label>
       <p class="p5"><label>确认新密码</label>
            <input type="password" style="width: 5.04rem;" class="loginValue" name="repwd" placeholder="确认新密码">
       </p>
       <label class="tip-box repwd_note" style="display:none">密码不一致，请重新输入</label>
       <p class="p5" style="margin-top: 0.7rem;"><input type="button" class="input_news_password" id="msubmit"  value="找回密码" /></p>
        </form>
       <p class="forget_dibu" style="margin-bottom: 150px;">
           <span>已有账号去<a href="/user/login">登录</a></span>
           <span>没有账号去<a href="www.yuanbao.com/user/reg/user/reg">注册</a></span>
       </p>
</div>
<div style="clear: both;"></div>
<footer class="footer">
      <div class="footer_kefu_news">
        <a href="tel:4008367667"><i></i>4008-367-667</a>
        <a><i></i>ybw@yuanbao.com</a>
    </div>
    <p>
        <span>
            <a href="javascript:void(0);" class="a1" id="phone">手机版</a>
            <i>|</i>
            <a href="javascript:void(0);" class="a2" id="window">电脑版</a>
            <i>|</i>
            <a href="/Assist/assist" class="a3">帮助中心</a>
        </span>
    </p>
<!--    <p  style="text-align:center" >
			<span>
			<a href="javascript:void(0);" class="a1" id="phone">手机版</a>
				<i>|</i>
				<a href="javascript:void(0);" class="a2" id="window">电脑版</a>
			</span>
            </p>-->
  
    <div>
        Copyright2013-2016 元宝网
    </div>
</footer>
<!--<script>
    //域名跳转
    $('#phone').click(function(){
        location.reload();
    })
    $('#window').click(function(){
        var mode = 1;
        $.post('/ajax/changemode',{mode:mode},function(){
            window.location.href = 'http://www.yuanbao.com/coins?notice=1';
        })
    })
</script>-->
<script>
    /*$('#phone').click(function(){
     $.post('/ajax/changemode',{mode:0},function(){
     location.reload();
     })
     })*/
    $('#window').click(function(){
        $.post('/ajax/changemode',{mode:1},function(){
            window.location.href = 'https://www.yuanbao.com/coins?notice=1';
        })
    })
</script><script  type="text/javascript" src="../js/layer.min.js"></script>
<script type="text/javascript" src="../js/zepto_1.js"></script>
<script>
  $(function(){
         $(".bullet_p .bull_click").click(function() {
           $(this).addClass('actives').siblings().removeClass('actives');
            var index =   $(".bullet_p .bull_click").index(this);  
            $(".tb-box1 form").eq(index).show().siblings(".tb-box1 form").hide();                                                   
        });   
  })
  
      $("input[name='phone']").bind('blur', function(){
         $.post("/user/moExist",{mo:$(this).val()},function(d){
             var d = eval('('+d+')');
            if(d.code !== 1){
               $('.phone_note').css('display','block');
                return false;
            }else{
               $('.phone_note').css('display','none');
            }
        });
    })
    
    function sendPhoneCode(){
        var timecount = 60;
        var phone = $("input[name='phone']").val();
        if(phone <11 || phone == ''){
            $('.phone_note').html('手机号不正确');
            return false;
        }
	$.ajax({
		url:'/Ajax/sendmsg3',
		type:'post',
		data:{type:101,voice:0,mo:phone},
		dataType:'json',
		success:function(res){
		if(res.msg=="发送成功"){
                    countTime(timecount);
                    $('.phone_code').css('background','#ccc').html('<span class="count-time" style="margin-left: 0px;">'+timecount+'</span>秒后重新发送');
                        alert(res.msg);
                    }else{
			alert(res.msg);
                    }
		}

	});
    }
    
    var ii=0;
    var tc;
    function countTime(time){
        ii = time;
        ii--;
        if(ii==-1){
            $(".phone_code").css('background','#f60').attr('onclick','sendPhoneCode();').html('重新发送');
            window.clearTimeout(tc);
        }else{
            $("span.count-time").html(ii);
            tc=setTimeout(function() {
                countTime(ii)
            },1000);
        }
    }
    
    $("input[name='pwd']").bind('blur',function(){
        var pwd_len = $(this).val().length; 
        var reg = /[\u4E00-\u9FA5\uF900-\uFA2D]/;
        var gerr = $("input[name='pwd']").val();
        var patt = /^[^ ]+$/;
        if(pwd_len < 6 || pwd_len > 20){
             $('.pwd_note').css('display','block').text("密码长度在6-20个字符之间");
            return false;
        }
       
        else if(reg.test(gerr) || !patt.test(gerr)){
              $('.pwd_note').css('display','block').text('密码不能包含汉字或者空格！');
                return false;
            }

        else{
             $('.pwd_note').css('display','none');;
        }
    })
    
    $("input[name='repwd']").bind('blur',function(){
        var pwd = $("input[name='pwd']").val();
        var repwd = $(this).val();
        if(pwd != repwd){
            $('.repwd_note').css('display','block');;
            return false;
        }else{
             $('.repwd_note').css('display','none');;
        }
    })
    
    $("input[name='code']").bind('blur',function(){
        var code = $("input[name='code']").val();
        var code = $(this).val();
        if(code == ''){
            $('.code_note').css('display','block');;
            return false;
        }else{
             $('.code_note').css('display','none');;
        }
    })
    
    $('#msubmit').click(function(){
        var reg = /[\u4E00-\u9FA5\uF900-\uFA2D]/;
        var gerr = $("input[name='pwd']").val();
        var patt = /^[^ ]+$/;
        var phone = $("input[name='phone']").val();
        var code = $("input[name='code']").val();
        var pwd = $("input[name='pwd']").val();
        var repwd = $("input[name='repwd']").val();
        if(phone == '' ){
            $('.phone_note').css('display','block');;
            return false;
        }
        if(code == '' ){
           $('.code_note').css('display','block');;
            return false;
        }
        if(pwd == '' || repwd == ''){
            $('.repwd_note').css('display','block');;
            return false;
        }
         if( pwd!= repwd){
             $('.repwd_note').css('display','block');
            return false;
        }
       
         if(reg.test(gerr) || !patt.test(gerr)){
              $('.pwd_note').css('display','block').text('密码不能包含汉字或者空格！');
                return false;
            }
        $(this).attr('type','submit');
    })
</script>
</body>
